# @Time    :2025/3/27 9:25
list1 = [1, 2, 3, 4, 5]
list2 = ["a", "b", "c", "d", "e"]
tuple_list = [(i, j) for i in list1 for j in list2]
print(tuple_list)

# zip 拉链函数
list2 = [1,2,3,4]
list3 = ["a","b","c"]
zipped = zip(list2, list3)
list4 = list(zipped)
print(list4)

tuple1 = (100, 200, 300)
print(id(tuple1), tuple1)
tuple1 = tuple1 + (1, 2, 3)
print(id(tuple1), tuple1)

# 通过集合推导式创建集合。
set1 = {x for x in range(10) if x % 2 == 0}
print(set1)  # {0, 2, 4, 6, 8}
